home *** CD-ROM | disk | FTP | other *** search
/ Freelog 97 / FreelogNo97-MaiJuin2010.iso / Jeu / FlightGear / fgsetup-2.0.0.exe / {app} / data / keyboard.xml < prev    next >
Encoding:
Extensible Markup Language  |  2009-06-14  |  32.3 KB  |  1,416 lines

  1. <?xml version="1.0"?>
  2. <!--
  3. Key binding definitions.
  4.  
  5. Regular keycodes go up to 255; special keys start at 256, and can be
  6. calculated by adding 256 to the GLUT key value in glut.h.
  7.  
  8. All Nasal code in this file lives in a common Nasal namespace __kbd.
  9. All <nasal> blocks on the top level are executed in the order from
  10. top down before the key bindings are parsed.
  11. -->
  12.  
  13. <PropertyList>
  14.  <nasal>
  15.   <script>
  16.       # /devices/status/keyboard/event/modifier/ and /devices/status/keyboard/
  17.       # don't only have one BOOL child per modifier, but also contain the
  18.       # modifier bitmap themselves, using these bit values:
  19.       var mod = { shift: 1, ctrl: 2, alt: 4, meta: 8, super: 16, hyper: 32 };
  20.  
  21.       var modifiers = props.globals.getNode("/devices/status/keyboard");
  22.       var shift = props.globals.getNode("/devices/status/keyboard/shift");
  23.       var ctrl = props.globals.getNode("/devices/status/keyboard/ctrl");
  24.       var alt = props.globals.getNode("/devices/status/keyboard/alt");
  25.  
  26.       var space_release = func nil;
  27.       var space = func(state, mod) {
  28.           if (!state) {
  29.               space_release();
  30.               return space_release = func nil;
  31.           }
  32.           if (mod == 0 or mod == 1) {
  33.               controls.ptt(mod + 1);
  34.               space_release = func controls.ptt(0);
  35.           }
  36.       }
  37.  
  38.       ## uncomment this line to get keycode reports printed to the terminal window
  39.       #setlistener("devices/status/keyboard/event", func(n) debug.dump(n.getValues()));
  40.   </script>
  41.  </nasal>
  42.  
  43.  <key n="1">
  44.   <name>Ctrl-A</name>
  45.   <desc>Toggle autopilot altitude lock</desc>
  46.   <binding>
  47.    <command>nasal</command>
  48.    <script>
  49.      var node = props.globals.getNode("/autopilot/locks/altitude", 1);
  50.      if ( node.getValue() == "altitude-hold" ) {
  51.        node.setValue( "" );
  52.      } else {
  53.        node.setValue( "altitude-hold" );
  54.      }
  55.    </script>
  56.   </binding>
  57.  </key>
  58.  
  59.  <key n="2">
  60.   <name>Ctrl-B</name>
  61.   <desc>Toggle speedbrake</desc>
  62.   <binding>
  63.    <command>property-toggle</command>
  64.    <property>/controls/flight/speedbrake</property>
  65.   </binding>
  66.  </key>
  67.  
  68.  <key n="3">
  69.   <name>Ctrl-C</name>
  70.   <desc>Toggle clickable panel hotspots</desc>
  71.   <binding>
  72.    <command>property-toggle</command>
  73.    <property>/sim/panel-hotspots</property>
  74.   </binding>
  75.  </key>
  76.  
  77.  <key n="7">
  78.   <name>Ctrl-G</name>
  79.   <desc>Toggle autopilot glide slope lock</desc>
  80.   <binding>
  81.    <command>nasal</command>
  82.    <script>
  83.      var node = props.globals.getNode("/autopilot/locks/altitude", 1);
  84.      if ( node.getValue() == "gs1-hold" ) {
  85.        node.setValue( "" );
  86.      } else {
  87.        node.setValue( "gs1-hold" );
  88.      }
  89.    </script>
  90.   </binding>
  91.  </key>
  92.  
  93.  <key n="8">
  94.   <name>Ctrl-H</name>
  95.   <desc>Toggle autopilot heading lock</desc>
  96.   <binding>
  97.    <command>nasal</command>
  98.    <script>
  99.      var node = props.globals.getNode("/autopilot/locks/heading", 1);
  100.      if ( node.getValue() == "dg-heading-hold" ) {
  101.        node.setValue( "" );
  102.      } else {
  103.        node.setValue( "dg-heading-hold" );
  104.      }
  105.    </script>
  106.   </binding>
  107.  </key>
  108.  
  109.  <key n="10"> <!-- OSG -->
  110.   <name>Enter</name>
  111.   <desc>Move rudder right</desc>
  112.   <repeatable type="bool">true</repeatable>
  113.   <binding>
  114.    <command>property-adjust</command>
  115.    <property>/controls/flight/rudder</property>
  116.    <step type="double">0.05</step>
  117.   </binding>
  118.  </key>
  119.  
  120.  <key n="13"> <!-- PLIB -->
  121.   <name>Enter</name>
  122.   <desc>Move rudder right</desc>
  123.   <repeatable type="bool">true</repeatable>
  124.   <binding>
  125.    <command>property-adjust</command>
  126.    <property>/controls/flight/rudder</property>
  127.    <step type="double">0.05</step>
  128.   </binding>
  129.  </key>
  130.  
  131.  <key n="14">
  132.   <name>Ctrl-N</name>
  133.   <desc>Toggle autopilot nav1 lock</desc>
  134.   <binding>
  135.    <command>nasal</command>
  136.    <script>
  137.      var node = props.globals.getNode("/autopilot/locks/heading", 1);
  138.      if ( node.getValue() == "nav1-hold" ) {
  139.        node.setValue( "" );
  140.      } else {
  141.        node.setValue( "nav1-hold" );
  142.      }
  143.    </script>
  144.   </binding>
  145.  </key>
  146.  
  147.  <key n="16">
  148.   <name>Ctrl-P</name>
  149.   <desc>Toggle pitch hold</desc>
  150.   <binding>
  151.    <command>nasal</command>
  152.    <script>
  153.      var node = props.globals.getNode("/autopilot/locks/altitude", 1);
  154.      if ( node.getValue() == "pitch-hold" ) {
  155.        node.setValue( "" );
  156.      } else {
  157.        node.setValue( "pitch-hold" );
  158.        var pitch = props.globals.getNode("/autopilot/settings/target-pitch-deg", 1);
  159.        pitch.setValue( getprop("/orientation/pitch-deg") );
  160.      }
  161.    </script>
  162.   </binding>
  163.  </key>
  164.  
  165.  <key n="18">
  166.   <name>Ctrl-R</name>
  167.   <desc>Activate the instant replay system</desc>
  168.   <binding>
  169.    <command>replay</command>
  170.   </binding>
  171.  </key>
  172.  
  173.  <key n="19">
  174.   <name>Ctrl-S</name>
  175.   <desc>Toggle auto-throttle lock</desc>
  176.   <binding>
  177.    <command>nasal</command>
  178.    <script>
  179.      var node = props.globals.getNode("/autopilot/locks/speed", 1);
  180.      if ( node.getValue() == "speed-with-throttle" ) {
  181.        node.setValue( "" );
  182.      } else {
  183.        node.setValue( "speed-with-throttle" );
  184.      }
  185.    </script>
  186.   </binding>
  187.  </key>
  188.  
  189.  <key n="20">
  190.   <name>Ctrl-T</name>
  191.   <desc>Toggle autopilot terrain lock</desc>
  192.   <binding>
  193.    <command>nasal</command>
  194.    <script>
  195.      var node = props.globals.getNode("/autopilot/locks/altitude", 1);
  196.      if ( node.getValue() == "agl-hold" ) {
  197.        node.setValue( "" );
  198.      } else {
  199.        node.setValue( "agl-hold" );
  200.        var agl = props.globals.getNode("/autopilot/settings/target-agl-ft", 1);
  201.        agl.setValue( getprop("/position/altitude-agl-ft") );
  202.      }
  203.    </script>
  204.   </binding>
  205.  </key>
  206.  
  207.  <key n="21">
  208.   <name>Ctrl-U</name>
  209.   <desc>[Cheat] Add 1000ft of emergency altitude</desc>
  210.   <binding>
  211.    <command>property-adjust</command>
  212.    <property>/position/altitude-ft</property>
  213.    <step type="double">1000.0</step>
  214.   </binding>
  215.   <binding>
  216.    <command>property-assign</command>
  217.    <property>/sim/startup/onground</property>
  218.    <value type="bool">false</value>
  219.   </binding>
  220.  </key>
  221.  
  222.  <key n="22">
  223.   <name>Ctrl-V</name>
  224.   <desc>Select initial view (view 0)</desc>
  225.   <binding>
  226.    <command>property-assign</command>
  227.    <property>/sim/current-view/view-number</property>
  228.    <value>0</value>
  229.   </binding>
  230.  </key>
  231.  
  232.  <key n="23">
  233.   <name>Ctrl-W</name>
  234.   <desc>Toggle autopilot wing leveler</desc>
  235.   <binding>
  236.    <command>nasal</command>
  237.    <script>
  238.      var node = props.globals.getNode("/autopilot/locks/heading", 1);
  239.      if ( node.getValue() == "wing-leveler" ) {
  240.        node.setValue( "" );
  241.      } else {
  242.        node.setValue( "wing-leveler" );
  243.      }
  244.    </script>
  245.   </binding>
  246.  </key>
  247.  
  248.  <key n="24">
  249.   <name>Ctrl-X</name>
  250.   <desc>Reset zoom to default</desc>
  251.   <binding>
  252.    <command>property-assign</command>
  253.    <property>/sim/current-view/field-of-view</property>
  254.    <property>/sim/view/config/default-field-of-view-deg</property>
  255.   </binding>
  256.  </key>
  257.  
  258.  <key n="27">
  259.   <name>ESC</name>
  260.   <desc>Prompt and quit FlightGear</desc>
  261.   <binding>
  262.     <command>dialog-show</command>
  263.     <dialog-name>exit</dialog-name>
  264.   </binding>
  265.   <mod-shift>
  266.    <desc>Reset FlightGear</desc>
  267.    <binding>
  268.     <command>reset</command>
  269.    </binding>
  270.   </mod-shift>
  271.  </key>
  272.  
  273.  <key n="32">
  274.   <name>SPACE</name>
  275.   <desc>PTT - Push To Talk (via VoIP)</desc>
  276.   <binding>
  277.    <command>nasal</command>
  278.    <script>space(1, modifiers.getValue())</script>
  279.   </binding>
  280.   <mod-up>
  281.    <binding>
  282.     <command>nasal</command>
  283.     <script>space(0, modifiers.getValue())</script>
  284.    </binding>
  285.   </mod-up>
  286.   <mod-shift>
  287.    <binding>
  288.     <command>nasal</command>
  289.     <script>space(1, modifiers.getValue())</script>
  290.    </binding>
  291.    <mod-up>
  292.     <binding>
  293.      <command>nasal</command>
  294.      <script>space(0, modifiers.getValue())</script>
  295.     </binding>
  296.    </mod-up>
  297.   </mod-shift>
  298.  </key>
  299.  
  300.  <key n="33">
  301.   <name>!</name>
  302.   <desc>Select first engine</desc>
  303.   <binding>
  304.    <command>nasal</command>
  305.    <script>controls.selectEngine(0)</script>
  306.   </binding>
  307.  </key>
  308.  
  309.  <key n="35">
  310.   <name>#</name>
  311.   <desc>Select third engine</desc>
  312.   <binding>
  313.    <command>nasal</command>
  314.    <script>controls.selectEngine(2)</script>
  315.   </binding>
  316.  </key>
  317.  
  318.  <key n="36">
  319.   <name>$</name>
  320.   <desc>Select fourth engine</desc>
  321.   <binding>
  322.    <command>nasal</command>
  323.    <script>controls.selectEngine(3)</script>
  324.   </binding>
  325.  </key>
  326.  
  327.  <key n="39">
  328.   <name>'</name>
  329.   <desc>Display a dialog relevant to the tuned in ATC service (if any)</desc>
  330.   <binding>
  331.     <command>ATC-dialog</command>
  332.   </binding>
  333.  </key>
  334.  
  335.  <key n="43">
  336.   <name>+</name>
  337.   <desc>Let ATC/instructor repeat last message</desc>
  338.   <binding>
  339.     <command>nasal</command>
  340.     <script>screen.msg_repeat()</script>
  341.   </binding>
  342.  </key>
  343.  
  344.  <key n="44">
  345.   <name>,</name>
  346.   <desc>Left brake</desc>
  347.   <binding>
  348.    <command>nasal</command>
  349.    <script>controls.applyBrakes(1, -1)</script>
  350.   </binding>
  351.   <mod-up>
  352.    <binding>
  353.     <command>nasal</command>
  354.     <script>controls.applyBrakes(0, -1)</script>
  355.    </binding>
  356.   </mod-up>
  357.  </key>
  358.  
  359.  <key n="45">
  360.   <name>-</name>
  361.   <repeatable type="bool">false</repeatable>
  362.   <desc>Chat Menu</desc>
  363.   <binding>
  364.      <command>dialog-show</command>
  365.      <dialog-name>chat-menu</dialog-name>
  366.   </binding>
  367.  </key>
  368.  
  369.  <key n="46">
  370.   <name>.</name>
  371.   <desc>Right brake</desc>
  372.   <binding>
  373.    <command>nasal</command>
  374.    <script>controls.applyBrakes(1, 1)</script>
  375.   </binding>
  376.   <mod-up>
  377.    <binding>
  378.     <command>nasal</command>
  379.     <script>controls.applyBrakes(0, 1)</script>
  380.    </binding>
  381.   </mod-up>
  382.  </key>
  383.  
  384.  <key n="47">
  385.   <name>/</name>
  386.   <desc>Open property browser</desc>
  387.   <binding>
  388.    <condition>
  389.     <not>
  390.      <property>/sim/input/property-key-handler</property>
  391.     </not>
  392.    </condition>
  393.    <command>nasal</command>
  394.    <script>gui.property_browser()</script>
  395.   </binding>
  396.   <binding>
  397.    <condition>
  398.     <property>/sim/input/property-key-handler</property>
  399.    </condition>
  400.    <command>nasal</command>
  401.    <script>prop_key_handler.start()</script>
  402.   </binding>
  403.  </key>
  404.  
  405.  <key n="48">
  406.   <name>0</name>
  407.   <desc>Move rudder left</desc>
  408.   <repeatable type="bool">true</repeatable>
  409.   <binding>
  410.    <command>property-adjust</command>
  411.    <property>/controls/flight/rudder</property>
  412.    <step type="double">-0.05</step>
  413.   </binding>
  414.  </key>
  415.  
  416.  <key n="49">
  417.   <name>1</name>
  418.   <desc>Decrease elevator trim</desc>
  419.   <repeatable type="bool">true</repeatable>
  420.   <binding>
  421.    <command>property-adjust</command>
  422.    <property>/controls/flight/elevator-trim</property>
  423.    <step type="double">-0.001</step>
  424.   </binding>
  425.   <mod-shift>
  426.     <desc>Look back left</desc>
  427.     <binding>
  428.      <command>property-assign</command>
  429.      <property>/sim/current-view/goal-heading-offset-deg</property>
  430.      <property>/sim/view/config/back-left-direction-deg</property>
  431.     </binding>
  432.   </mod-shift>
  433.  </key>
  434.  
  435.  <key n="50">
  436.   <name>2</name>
  437.   <desc>Increase elevator or autopilot altitude</desc>
  438.   <repeatable type="bool">true</repeatable>
  439.   <binding>
  440.    <command>nasal</command>
  441.    <script>
  442.      controls.incElevator(-0.05, 100)
  443.    </script>
  444.   </binding>
  445.   <mod-shift>
  446.    <desc>Look back</desc>
  447.    <binding>
  448.     <command>property-assign</command>
  449.     <property>/sim/current-view/goal-heading-offset-deg</property>
  450.     <property>/sim/view/config/back-direction-deg</property>
  451.    </binding>
  452.   </mod-shift>
  453.  </key>
  454.  
  455.  <key n="51">
  456.   <name>3</name>
  457.   <desc>Decrease throttle or autopilot autothrottle</desc>
  458.   <repeatable type="bool">true</repeatable>
  459.   <binding>
  460.    <command>nasal</command>
  461.    <script>
  462.      controls.incThrottle(-0.01, -1.0)
  463.    </script>
  464.   </binding>
  465.   <mod-shift>
  466.    <desc>Look back right</desc>
  467.    <binding>
  468.     <command>property-assign</command>
  469.     <property>/sim/current-view/goal-heading-offset-deg</property>
  470.     <property>/sim/view/config/back-right-direction-deg</property>
  471.    </binding>
  472.   </mod-shift>
  473.  </key>
  474.  
  475.  <key n="52">
  476.   <name>4</name>
  477.   <desc>Move aileron left (or adjust AP heading.)</desc>
  478.   <repeatable type="bool">true</repeatable>
  479.   <binding>
  480.    <command>nasal</command>
  481.    <script>
  482.      controls.incAileron(-0.05, -1.0)
  483.    </script>
  484.   </binding>
  485.   <mod-shift>
  486.    <desc>Look left</desc>
  487.    <binding>
  488.     <command>property-assign</command>
  489.     <property>/sim/current-view/goal-heading-offset-deg</property>
  490.     <property>/sim/view/config/left-direction-deg</property>
  491.    </binding>
  492.   </mod-shift>
  493.  </key>
  494.  
  495.  <key n="53">
  496.   <name>5</name>
  497.   <desc>Center aileron, elevator, and rudder</desc>
  498.   <binding>
  499.    <command>nasal</command>
  500.    <script>controls.centerFlightControls()</script>
  501.   </binding>
  502.  </key>
  503.  
  504.  <key n="54">
  505.   <name>6</name>
  506.   <desc>Move aileron right (or adjust AP heading.)</desc>
  507.   <repeatable type="bool">true</repeatable>
  508.   <binding>
  509.    <command>nasal</command>
  510.    <script>
  511.      controls.incAileron(0.05, 1.0)
  512.    </script>
  513.   </binding>
  514.   <mod-shift>
  515.    <desc>Look right</desc>
  516.    <binding>
  517.     <command>property-assign</command>
  518.     <property>/sim/current-view/goal-heading-offset-deg</property>
  519.     <property>/sim/view/config/right-direction-deg</property>
  520.    </binding>
  521.   </mod-shift>
  522.  </key>
  523.  
  524.  <key n="55">
  525.   <name>7</name>
  526.   <desc>Increase elevator trim</desc>
  527.   <repeatable type="bool">true</repeatable>
  528.   <binding>
  529.    <command>property-adjust</command>
  530.    <property>/controls/flight/elevator-trim</property>
  531.    <step type="double">0.001</step>
  532.   </binding>
  533.   <mod-shift>
  534.    <desc>Look front left</desc>
  535.    <binding>
  536.     <command>property-assign</command>
  537.     <property>/sim/current-view/goal-heading-offset-deg</property>
  538.     <property>/sim/view/config/front-left-direction-deg</property>
  539.    </binding>
  540.   </mod-shift>
  541.  </key>
  542.  
  543.  <key n="56">
  544.   <name>8</name>
  545.   <desc>Decrease elevator or autopilot altitude</desc>
  546.   <repeatable type="bool">true</repeatable>
  547.   <binding>
  548.    <command>nasal</command>
  549.    <script>
  550.      controls.incElevator(0.05, -100)
  551.    </script>
  552.   </binding>
  553.   <mod-shift>
  554.    <desc>Look forward</desc>
  555.    <binding>
  556.     <command>property-assign</command>
  557.     <property>/sim/current-view/goal-heading-offset-deg</property>
  558.     <property>/sim/view/config/front-direction-deg</property>
  559.    </binding>
  560.   </mod-shift>
  561.  </key>
  562.  
  563.  <key n="57">
  564.   <name>9</name>
  565.   <desc>Increase throttle or autopilot autothrottle</desc>
  566.   <repeatable type="bool">true</repeatable>
  567.   <binding>
  568.   <command>nasal</command>
  569.    <script>
  570.      controls.incThrottle(0.01, 1.0)
  571.    </script>
  572.   </binding>
  573.   <mod-shift>
  574.    <desc>Look front right</desc>
  575.    <binding>
  576.     <command>property-assign</command>
  577.     <property>/sim/current-view/goal-heading-offset-deg</property>
  578.     <property>/sim/view/config/front-right-direction-deg</property>
  579.    </binding>
  580.   </mod-shift>
  581.  </key>
  582.  
  583.  <key n="58">
  584.   <name>:</name>
  585.   <desc>Start multikey command</desc>
  586.   <binding>
  587.    <command>nasal</command>
  588.    <script>multikey.start()</script>
  589.   </binding>
  590.  </key>
  591.  
  592.  <key n="63">
  593.   <name>?</name>
  594.   <desc>Show help dialog</desc>
  595.   <binding>
  596.    <command>nasal</command>
  597.    <script>gui.showHelpDialog("/sim/help", 1)</script>
  598.   </binding>
  599.  </key>
  600.  
  601.  <key n="64">
  602.   <name>@</name>
  603.   <desc>Select second engine</desc>
  604.   <binding>
  605.    <command>nasal</command>
  606.    <script>controls.selectEngine(1)</script>
  607.   </binding>
  608.  </key>
  609.  
  610.  <key n="65">
  611.   <name>A</name>
  612.   <desc>Decrease speed-up</desc>
  613.   <binding>
  614.    <command>property-adjust</command>
  615.    <property>/sim/speed-up</property>
  616.    <min>1</min>
  617.    <step type="double">-1</step>
  618.   </binding>
  619.  </key>
  620.  
  621.  <key n="66">
  622.   <name>B</name>
  623.   <desc>Toggle parking brake on or off</desc>
  624.   <binding>
  625.    <command>nasal</command>
  626.    <script>controls.applyParkingBrake(1)</script>
  627.   </binding>
  628.   <mod-up>
  629.    <binding>
  630.     <command>nasal</command>
  631.     <script>controls.applyParkingBrake(0)</script>
  632.    </binding>
  633.   </mod-up>
  634.  </key>
  635.  
  636.  <key n="71">
  637.   <name>G</name>
  638.   <desc>Gear down</desc>
  639.   <binding>
  640.    <command>nasal</command>
  641.    <script>controls.gearDown(1)</script>
  642.   </binding>
  643.   <mod-up>
  644.    <binding>
  645.     <command>nasal</command>
  646.     <script>controls.gearDown(0)</script>
  647.    </binding>
  648.   </mod-up>
  649.  </key>
  650.  
  651.  <key n="72">
  652.   <name>H</name>
  653.   <desc>Cycle HUD Brightness</desc>
  654.   <binding>
  655.    <command>nasal</command>
  656.    <script>aircraft.HUD.cycle_brightness()</script>
  657.   </binding>
  658.  </key>
  659.  
  660.  <key n="73">
  661.   <name>I</name>
  662.   <desc>Switch to and toggle alternative HUD types</desc>
  663.   <binding>
  664.    <command>nasal</command>
  665.    <script>aircraft.HUD.cycle_type()</script>
  666.   </binding>
  667.  </key>
  668.  
  669.  <key n="77">
  670.   <name>M</name>
  671.   <desc>Mixture leaner</desc>
  672.   <repeatable type="bool">true</repeatable>
  673.   <binding>
  674.    <command>nasal</command>
  675.    <script>controls.adjMixture(-1)</script>
  676.   </binding>
  677.  </key>
  678.  
  679.  <key n="78">
  680.   <name>N</name>
  681.   <desc>Propeller Coarser</desc>
  682.   <repeatable type="bool">true</repeatable>
  683.   <binding>
  684.    <command>nasal</command>
  685.    <script>controls.adjPropeller(-1)</script>
  686.   </binding>
  687.  </key>
  688.  
  689.  <key n="80">
  690.   <name>P</name>
  691.   <desc>Toggle panel</desc>
  692.   <binding>
  693.    <command>property-toggle</command>
  694.    <property>/sim/panel/visibility</property>
  695.   </binding>
  696.  </key>
  697.  
  698.  <key n="83">
  699.   <name>S</name>
  700.   <desc>Swap panels</desc>
  701.   <binding>
  702.    <condition>
  703.      <not>
  704.      <property>/sim/allow-toggle-cockpit</property>
  705.      </not>
  706.    </condition>
  707.    <command>property-swap</command>
  708.    <property>/sim/panel/path</property>
  709.    <property>/sim/panel_2/path</property>
  710.   </binding>
  711.   <binding>
  712.    <condition>
  713.      <not>
  714.      <property>/sim/allow-toggle-cockpit</property>
  715.      </not>
  716.    </condition>
  717.    <command>panel-load</command>
  718.   </binding>
  719.  </key>
  720.  
  721.  <key n="84">
  722.   <name>T</name>
  723.   <desc>Decrease warp delta</desc>
  724.   <binding>
  725.    <command>property-adjust</command>
  726.    <property>/sim/time/warp-delta</property>
  727.    <step type="int">-30</step>
  728.   </binding>
  729.  </key>
  730.  
  731.  <key n="86">
  732.   <name>V</name>
  733.   <desc>Scroll in reverse through views</desc>
  734.   <binding>
  735.    <command>nasal</command>
  736.    <script>view.stepView(-1)</script>
  737.   </binding>
  738.  </key>
  739.  
  740.  <key n="87">
  741.   <name>W</name>
  742.   <desc>Decrease warp</desc>
  743.   <binding>
  744.    <command>property-adjust</command>
  745.    <property>/sim/time/warp</property>
  746.    <step type="int">-60</step>
  747.   </binding>
  748.  </key>
  749.  
  750.  <key n="88">
  751.   <name>X</name>
  752.   <desc>Increase field of view</desc>
  753.   <repeatable type="bool">true</repeatable>
  754.   <binding>
  755.    <command>nasal</command>
  756.    <script>view.increase()</script>
  757.   </binding>
  758.  </key>
  759.  
  760.  <key n="90">
  761.   <name>Z</name>
  762.   <desc>Decrease Visibility</desc>
  763.   <repeatable type="bool">true</repeatable>
  764.   <binding>
  765.    <command>decrease-visibility</command>
  766.   </binding>
  767.  </key>
  768.  
  769.  <key n="91">
  770.   <name>[</name>
  771.   <desc>Decrease flaps</desc>
  772.   <binding>
  773.    <command>nasal</command>
  774.    <script>controls.flapsDown(-1)</script>
  775.   </binding>
  776.   <mod-up>
  777.    <binding>
  778.     <command>nasal</command>
  779.     <script>controls.flapsDown(0)</script>
  780.    </binding>
  781.   </mod-up>
  782.  </key>
  783.  
  784.  <key n="93">
  785.   <name>]</name>
  786.   <desc>Increase flaps</desc>
  787.   <binding>
  788.    <command>nasal</command>
  789.    <script>controls.flapsDown(1)</script>
  790.   </binding>
  791.   <mod-up>
  792.    <binding>
  793.     <command>nasal</command>
  794.     <script>controls.flapsDown(0)</script>
  795.    </binding>
  796.   </mod-up>
  797.  </key>
  798.  
  799.  <key n="95">
  800.   <name>_</name>
  801.   <repeatable type="bool">false</repeatable>
  802.   <desc>Compose Chat</desc>
  803.   <binding>
  804.     <command>nasal</command>
  805.     <script>multiplayer.compose_message()</script>
  806.   </binding>
  807.  </key>
  808.  
  809.  <key n="97">
  810.   <name>a</name>
  811.   <desc>Increase speed-up</desc>
  812.   <binding>
  813.    <command>property-adjust</command>
  814.    <property>/sim/speed-up</property>
  815.    <min>1</min>
  816.    <step type="double">1</step>
  817.   </binding>
  818.  </key>
  819.  
  820.  <key n="98">
  821.   <name>b</name>
  822.   <desc>Apply all brakes</desc>
  823.   <binding>
  824.    <command>nasal</command>
  825.    <script>controls.applyBrakes(1)</script>
  826.   </binding>
  827.   <mod-up>
  828.    <binding>
  829.     <command>nasal</command>
  830.     <script>controls.applyBrakes(0)</script>
  831.    </binding>
  832.   </mod-up>
  833.  </key>
  834.  
  835.  <key n="99">
  836.   <name>c</name>
  837.   <desc>Toggle 3D/2D cockpit</desc>
  838.   <binding>
  839.    <command>nasal</command>
  840.    <script>
  841.     if(getprop("/sim/allow-toggle-cockpit")) {
  842.         setprop("/sim/current-view/internal", !getprop("/sim/current-view/internal"));
  843.         setprop("/sim/view/internal", getprop("/sim/current-view/internal"));
  844.         setprop("/sim/virtual-cockpit", !getprop("/sim/virtual-cockpit"));
  845.         if(getprop("/sim/current-view/internal")) {
  846.           setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/config/heading-offset-deg"));
  847.           setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/config/pitch-offset-deg"));
  848.         } else {
  849.           setprop("/sim/current-view/heading-offset-deg", 0);
  850.           setprop("/sim/current-view/pitch-offset-deg", 0);
  851.         }
  852.     }
  853.    </script>
  854.   </binding>
  855.  </key>
  856.  
  857.  <key n="103">
  858.   <name>g</name>
  859.   <desc>Gear Up</desc>
  860.   <binding>
  861.    <command>nasal</command>
  862.    <script>controls.gearDown(-1)</script>
  863.   </binding>
  864.   <mod-up>
  865.    <binding>
  866.     <command>nasal</command>
  867.     <script>controls.gearDown(0)</script>
  868.    </binding>
  869.   </mod-up>
  870.  </key>
  871.  
  872.  <key n="104">
  873.   <name>h</name>
  874.   <desc>HUD Master Switch</desc>
  875.   <binding>
  876.    <command>nasal</command>
  877.    <script>aircraft.HUD.cycle_color()</script>
  878.   </binding>
  879.  </key>
  880.  
  881.  <key n="105">
  882.   <name>i</name>
  883.   <desc>Normal HUD</desc>
  884.   <binding>
  885.    <command>nasal</command>
  886.    <script>aircraft.HUD.normal_type()</script>
  887.   </binding>
  888.  </key>
  889.  
  890.  <key n="106">
  891.   <name>j</name>
  892.   <desc>Decrease spoilers</desc>
  893.   <binding>
  894.    <command>nasal</command>
  895.    <script>controls.stepSpoilers(-1)</script>
  896.   </binding>
  897.  </key>
  898.  
  899.  <key n="107">
  900.   <name>k</name>
  901.   <desc>Increase spoilers</desc>
  902.   <binding>
  903.    <command>nasal</command>
  904.    <script>controls.stepSpoilers(1)</script>
  905.   </binding>
  906.  </key>
  907.  
  908.  <key n="108">
  909.   <name>l</name>
  910.   <desc>Toggle tail-wheel lock</desc>
  911.   <binding>
  912.    <command>property-toggle</command>
  913.    <property>/controls/gear/tailwheel-lock</property>
  914.   </binding>
  915.  </key>
  916.  
  917.  <key n="109">
  918.   <name>m</name>
  919.   <desc>Mixture richer</desc>
  920.   <repeatable type="bool">true</repeatable>
  921.   <binding>
  922.    <command>nasal</command>
  923.    <script>controls.adjMixture(1)</script>
  924.   </binding>
  925.  </key>
  926.  
  927.  <key n="110">
  928.   <name>n</name>
  929.   <desc>Propeller Finer</desc>
  930.   <repeatable type="bool">true</repeatable>
  931.   <binding>
  932.    <command>nasal</command>
  933.    <script>controls.adjPropeller(1)</script>
  934.   </binding>
  935.  </key>
  936.  
  937.  <key n="112">
  938.   <name>p</name>
  939.   <desc>Toggle the pause state of the sim</desc>
  940.   <binding>
  941.    <command>property-toggle</command>
  942.    <property>/sim/freeze/master</property>
  943.   </binding>
  944.   <binding>
  945.    <command>property-toggle</command>
  946.    <property>/sim/freeze/clock</property>
  947.   </binding>
  948.   <binding>
  949.    <condition>
  950.      <property>/sim/freeze/replay-state</property>
  951.    </condition>
  952.    <command>property-assign</command>
  953.    <property>/sim/freeze/replay-state</property>
  954.    <value type="int">0</value>
  955.   </binding>
  956.  </key>
  957.  
  958.  <key n="115">
  959.   <name>s</name>
  960.   <desc>Fire Starter on Selected Engine(s)</desc>
  961.   <binding>
  962.    <command>nasal</command>
  963.    <script>controls.startEngine(1)</script>
  964.   </binding>
  965.   <mod-up>
  966.    <binding>
  967.     <command>nasal</command>
  968.     <script>controls.startEngine(0)</script>
  969.    </binding>
  970.   </mod-up>
  971.  </key>
  972.  
  973.  <nasal>
  974.   <script>
  975.     var t_id = 0;
  976.   </script>
  977.  </nasal>
  978.  
  979.  <key n="116">
  980.   <name>t</name>
  981.   <desc>Increase warp delta</desc>
  982.   <binding>
  983.    <command>property-adjust</command>
  984.    <property>/sim/time/warp-delta</property>
  985.    <step type="int">30</step>
  986.   </binding>
  987.   <binding>
  988.    <command>nasal</command>
  989.    <script>
  990.     (func(x) {
  991.         settimer(func {
  992.             x == t_id or return;
  993.             gui.popupTip("resetting warp");
  994.             setprop("/sim/time/warp-delta", 0);
  995.         }, 1, 1)
  996.     })(t_id += 1)
  997.    </script>
  998.   </binding>
  999.   <mod-up>
  1000.    <binding>
  1001.     <command>nasal</command>
  1002.     <script>t_id += 1</script>
  1003.    </binding>
  1004.   </mod-up>
  1005.  </key>
  1006.  
  1007.  <key n="118">
  1008.   <name>v</name>
  1009.   <desc>Scroll through views</desc>
  1010.   <binding>
  1011.    <command>nasal</command>
  1012.    <script>view.stepView(1)</script>
  1013.   </binding>
  1014.  </key>
  1015.  
  1016.  <key n="119">
  1017.   <name>w</name>
  1018.   <desc>Increase warp</desc>
  1019.   <binding>
  1020.    <command>property-adjust</command>
  1021.    <property>/sim/time/warp</property>
  1022.    <step type="int">60</step>
  1023.   </binding>
  1024.  </key>
  1025.  
  1026.  <key n="120">
  1027.   <name>x</name>
  1028.   <desc>Decrease field of view</desc>
  1029.   <repeatable type="bool">true</repeatable>
  1030.   <binding>
  1031.    <command>nasal</command>
  1032.    <script>view.decrease()</script>
  1033.   </binding>
  1034.  </key>
  1035.  
  1036.  <key n="122">
  1037.   <name>z</name>
  1038.   <desc>Increase Visibility</desc>
  1039.   <repeatable type="bool">true</repeatable>
  1040.   <binding>
  1041.    <command>increase-visibility</command>
  1042.   </binding>
  1043.  </key>
  1044.  
  1045.  <key n="123">
  1046.   <name>{</name>
  1047.   <desc>Decrease Magneto on Selected Engine</desc>
  1048.   <binding>
  1049.    <command>nasal</command>
  1050.    <script>controls.stepMagnetos(-1)</script>
  1051.   </binding>
  1052.   <mod-up>
  1053.    <binding>
  1054.     <command>nasal</command>
  1055.     <script>controls.stepMagnetos(0)</script>
  1056.    </binding>
  1057.   </mod-up>
  1058.  </key>
  1059.  
  1060.  <key n="125">
  1061.   <name>}</name>
  1062.   <desc>Increase Magneto on Selected Engine</desc>
  1063.   <binding>
  1064.    <command>nasal</command>
  1065.    <script>controls.stepMagnetos(1)</script>
  1066.   </binding>
  1067.   <mod-up>
  1068.    <binding>
  1069.     <command>nasal</command>
  1070.     <script>controls.stepMagnetos(0)</script>
  1071.    </binding>
  1072.   </mod-up>
  1073.  </key>
  1074.  
  1075.  <key n="126">
  1076.   <name>~</name>
  1077.   <desc>Select all engines</desc>
  1078.   <binding>
  1079.    <command>nasal</command>
  1080.    <script>controls.selectAllEngines()</script>
  1081.   </binding>
  1082.  </key>
  1083.  
  1084.  <key n="257">
  1085.   <name>F1</name>
  1086.   <mod-shift>
  1087.    <desc>Load flight</desc>
  1088.    <binding>
  1089.     <command>load</command>
  1090.    </binding>
  1091.   </mod-shift>
  1092.  </key>
  1093.  
  1094.  <key n="258">
  1095.   <mod-shift>
  1096.    <desc>Save flight</desc>
  1097.    <binding>
  1098.     <command>save</command>
  1099.     <write-all>false</write-all>
  1100.    </binding>
  1101.   </mod-shift>
  1102.  </key>
  1103.  
  1104.  <key n="259">
  1105.   <name>F3</name>
  1106.   <desc>Capture screen</desc>
  1107.   <binding>
  1108.    <command>nasal</command>
  1109.    <script>
  1110.      var success = fgcommand("screen-capture");
  1111.      var path = getprop("/sim/paths/screenshot-last");
  1112.      if (success)
  1113.          gui.popupTip("Screenshot written to '" ~ path ~ "'");
  1114.      else
  1115.          gui.popupTip("Error writing screenshot '" ~ path ~ "'");
  1116.    </script>
  1117.   </binding>
  1118.   <mod-shift>
  1119.    <desc>Load panel</desc>
  1120.    <binding>
  1121.     <command>panel-load</command>
  1122.    </binding>
  1123.   </mod-shift>
  1124.  </key>
  1125.  
  1126.  <key n="261">
  1127.   <name>F5</name>
  1128.   <repeatable type="bool">true</repeatable>
  1129.   <mod-shift>
  1130.    <desc>Scroll panel down</desc>
  1131.    <binding>
  1132.     <command>property-adjust</command>
  1133.     <property>/sim/panel/y-offset</property>
  1134.     <step type="int">-5</step>
  1135.    </binding>
  1136.   </mod-shift>
  1137.  </key>
  1138.  
  1139.  <key n="262">
  1140.   <name>F6</name>
  1141.   <desc>Toggle Autopilot Heading Mode</desc>
  1142.   <repeatable type="bool">true</repeatable>
  1143.   <binding>
  1144.    <command>nasal</command>
  1145.    <script>
  1146.     var prop = "/autopilot/locks/heading";
  1147.     var curr = getprop(prop);
  1148.     if(curr == "true-heading-hold") { setprop(prop, ""); }
  1149.     else { setprop(prop, "true-heading-hold"); }
  1150.    </script>
  1151.   </binding>
  1152.   <mod-shift>
  1153.    <desc>Scroll panel up</desc>
  1154.    <binding>
  1155.     <command>property-adjust</command>
  1156.     <property>/sim/panel/y-offset</property>
  1157.     <step type="int">5</step>
  1158.    </binding>
  1159.   </mod-shift>
  1160.  </key>
  1161.  
  1162.  <key n="263">
  1163.   <name>F7</name>
  1164.   <repeatable type="bool">true</repeatable>
  1165.   <mod-shift>
  1166.    <desc>Scroll panel left</desc>
  1167.    <binding>
  1168.     <command>property-adjust</command>
  1169.     <property>/sim/panel/x-offset</property>
  1170.     <step type="int">-5</step>
  1171.    </binding>
  1172.   </mod-shift>
  1173.  </key>
  1174.  
  1175.  <key n="264">
  1176.   <name>F8</name>
  1177.   <desc></desc>
  1178.   <repeatable type="bool">true</repeatable>
  1179.   <mod-shift>
  1180.    <desc>Scroll panel right</desc>
  1181.    <binding>
  1182.     <command>property-adjust</command>
  1183.     <property>/sim/panel/x-offset</property>
  1184.     <step type="int">5</step>
  1185.    </binding>
  1186.   </mod-shift>
  1187.  </key>
  1188.  
  1189.  <key n="266">
  1190.   <name>F10</name>
  1191.   <desc>Toggle menubar</desc>
  1192.   <binding>
  1193.    <command>property-toggle</command>
  1194.    <property>/sim/menubar/visibility</property>
  1195.   </binding>
  1196.   <mod-shift>
  1197.    <desc>Switch to next GUI style</desc>
  1198.    <binding>
  1199.     <command>nasal</command>
  1200.     <script>gui.nextStyle()</script>
  1201.    </binding>
  1202.   </mod-shift>
  1203.  </key>
  1204.  
  1205.  <key n="267">
  1206.   <name>F11</name>
  1207.   <desc>Pop up autopilot dialog</desc>
  1208.   <binding>
  1209.    <command>dialog-show</command>
  1210.    <dialog-name>autopilot</dialog-name>
  1211.   </binding>
  1212.  </key>
  1213.  
  1214.  <key n="268">
  1215.   <name>F12</name>
  1216.   <desc>Pop up radio settings dialog</desc>
  1217.   <binding>
  1218.    <command>dialog-show</command>
  1219.    <dialog-name>radios</dialog-name>
  1220.   </binding>
  1221.  </key>
  1222.  
  1223.  <key n="269">
  1224.   <name>Enter</name>
  1225.   <desc>Move rudder right</desc>
  1226.   <repeatable type="bool">true</repeatable>
  1227.   <binding>
  1228.    <command>property-adjust</command>
  1229.    <property>/controls/flight/rudder</property>
  1230.    <step type="double">0.05</step>
  1231.   </binding>
  1232.  </key>
  1233.  
  1234.  <key n="309">
  1235.   <name>Keypad 5</name>
  1236.   <desc>Center aileron, elevator, and rudder</desc>
  1237.   <binding>
  1238.    <command>nasal</command>
  1239.    <script>controls.centerFlightControls()</script>
  1240.   </binding>
  1241.  </key>
  1242.  
  1243.  <key n="356">
  1244.   <name>Left</name>
  1245.   <desc>Move aileron left (or adjust AP heading.)</desc>
  1246.   <repeatable type="bool">true</repeatable>
  1247.   <binding>
  1248.    <command>nasal</command>
  1249.    <script>
  1250.      controls.incAileron(-0.05, -1.0)
  1251.    </script>
  1252.   </binding>
  1253.   <mod-shift>
  1254.    <desc>Look left</desc>
  1255.    <binding>
  1256.     <command>property-assign</command>
  1257.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1258.     <property>/sim/view/config/left-direction-deg</property>
  1259.    </binding>
  1260.   </mod-shift>
  1261.  </key>
  1262.  
  1263.  <key n="357">
  1264.   <name>Up</name>
  1265.   <desc>Increase elevator or autopilot altitude</desc>
  1266.   <repeatable type="bool">true</repeatable>
  1267.   <binding>
  1268.    <command>nasal</command>
  1269.    <script>
  1270.      controls.incElevator(0.05, -100)
  1271.    </script>
  1272.   </binding>
  1273.   <mod-shift>
  1274.    <desc>Look forward</desc>
  1275.    <binding>
  1276.     <command>property-assign</command>
  1277.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1278.     <property>/sim/view/config/front-direction-deg</property>
  1279.    </binding>
  1280.   </mod-shift>
  1281.  </key>
  1282.  
  1283.  <key n="358">
  1284.   <name>Right</name>
  1285.   <desc>Move aileron right (or adjust AP heading.)</desc>
  1286.   <repeatable type="bool">true</repeatable>
  1287.   <binding>
  1288.    <command>nasal</command>
  1289.    <script>
  1290.      controls.incAileron(0.05, 1.0)
  1291.    </script>
  1292.    <step type="double">0.05</step>
  1293.   </binding>
  1294.   <mod-shift>
  1295.    <desc>Look right</desc>
  1296.    <binding>
  1297.     <command>property-assign</command>
  1298.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1299.     <property>/sim/view/config/right-direction-deg</property>
  1300.    </binding>
  1301.   </mod-shift>
  1302.  </key>
  1303.  
  1304.  <key n="359">
  1305.   <name>Down</name>
  1306.   <desc>Decrease elevator or autopilot altitude</desc>
  1307.   <repeatable type="bool">true</repeatable>
  1308.   <binding>
  1309.    <command>nasal</command>
  1310.    <script>
  1311.      controls.incElevator(-0.05, 100)
  1312.    </script>
  1313.   </binding>
  1314.   <mod-shift>
  1315.    <desc>Look backwards</desc>
  1316.    <binding>
  1317.     <command>property-assign</command>
  1318.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1319.     <property>/sim/view/config/back-direction-deg</property>
  1320.    </binding>
  1321.   </mod-shift>
  1322.  </key>
  1323.  
  1324.  <key n="360">
  1325.   <name>PageUp</name>
  1326.   <desc>Increase throttle or autopilot autothrottle</desc>
  1327.   <repeatable type="bool">true</repeatable>
  1328.   <binding>
  1329.    <command>nasal</command>
  1330.    <script>
  1331.      controls.incThrottle(0.01, 1.0)
  1332.    </script>
  1333.   </binding>
  1334.   <mod-shift>
  1335.    <desc>Look front right</desc>
  1336.    <binding>
  1337.     <command>property-assign</command>
  1338.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1339.     <property>/sim/view/config/front-right-direction-deg</property>
  1340.    </binding>
  1341.   </mod-shift>
  1342.  </key>
  1343.  
  1344.  <key n="361">
  1345.   <name>PageDown</name>
  1346.   <desc>Decrease throttle or autopilot autothrottle</desc>
  1347.   <repeatable type="bool">true</repeatable>
  1348.   <binding>
  1349.    <command>nasal</command>
  1350.    <script>
  1351.      controls.incThrottle(-0.01, -1.0)
  1352.    </script>
  1353.   </binding>
  1354.   <mod-shift>
  1355.    <desc>Look back right</desc>
  1356.    <binding>
  1357.     <command>property-assign</command>
  1358.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1359.     <property>/sim/view/config/back-right-direction-deg</property>
  1360.    </binding>
  1361.   </mod-shift>
  1362.  </key>
  1363.  
  1364.  <key n="362">
  1365.   <name>Home</name>
  1366.   <desc>Increase elevator trim</desc>
  1367.   <repeatable type="bool">true</repeatable>
  1368.   <binding>
  1369.    <command>property-adjust</command>
  1370.    <property>/controls/flight/elevator-trim</property>
  1371.    <step type="double">0.001</step>
  1372.   </binding>
  1373.   <mod-shift>
  1374.    <desc>Look front left</desc>
  1375.    <binding>
  1376.     <command>property-assign</command>
  1377.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1378.     <property>/sim/view/config/front-left-direction-deg</property>
  1379.    </binding>
  1380.   </mod-shift>
  1381.  </key>
  1382.  
  1383.  <key n="363">
  1384.   <name>End</name>
  1385.   <desc>Decrease elevator trim</desc>
  1386.   <repeatable type="bool">true</repeatable>
  1387.   <binding>
  1388.    <command>property-adjust</command>
  1389.    <property>/controls/flight/elevator-trim</property>
  1390.    <step type="double">-0.001</step>
  1391.   </binding>
  1392.   <mod-shift>
  1393.    <desc>Look back left</desc>
  1394.    <binding>
  1395.     <command>property-assign</command>
  1396.     <property>/sim/current-view/goal-heading-offset-deg</property>
  1397.     <property>/sim/view/config/back-left-direction-deg</property>
  1398.    </binding>
  1399.   </mod-shift>
  1400.  </key>
  1401.  
  1402.  <key n="364">
  1403.   <name>Insert</name>
  1404.   <desc>Move rudder left</desc>
  1405.   <repeatable type="bool">true</repeatable>
  1406.   <binding>
  1407.    <command>property-adjust</command>
  1408.    <property>/controls/flight/rudder</property>
  1409.    <step type="double">-0.05</step>
  1410.   </binding>
  1411.  </key>
  1412.  
  1413. </PropertyList>
  1414.  
  1415. <!-- end of keyboard.xml -->
  1416.